STATIC VOID TE_SetABPenDrMd(struct TextEditContext *tec, LONG fgPen, LONG bgPen, LONG drawMode);
STATIC ULONG TE_TextLength(struct TextEditContext *tec, STRPTR string, LONG len);
STATIC ULONG TE_TextFit(struct TextEditContext *tec, STRPTR string, LONG len, LONG width);
STATIC ULONG TE_RoundedTextFit(struct TextEditContext *tec, STRPTR string, LONG len, LONG width, LONG *deltaPtr);
STATIC VOID TE_ScrollComplete(struct TextEditContext *tec, LONG deltaX, LONG deltaY);
STATIC LONG TE_StrLen(STRPTR string);
STATIC STRPTR TE_FindLine(struct TextEditContext *tec, LONG whichLine);
STATIC VOID TE_DrawComplete(struct TextEditContext *tec, LONG startLine, LONG stopLine);
STATIC VOID TE_FillArea(struct TextEditContext *tec, LONG left, LONG top, LONG width, LONG height);
STATIC VOID TE_PrintText(struct TextEditContext *tec, LONG skipPixels, LONG left, LONG top, LONG width, STRPTR string, LONG len);
STATIC VOID TE_CursorPositionToOffset(struct TextEditContext *tec, LONG *offsetPtr);
STATIC VOID TE_OffsetToCursorPosition(struct TextEditContext *tec, LONG offset);
STATIC BOOL TE_DetermineLinesAffectedByChanges(struct TextEditContext *tec, LONG firstByteChanged, LONG numBytesChanged, LONG *firstLinePtr, LONG *lastLinePtr);